#ifndef __PICTURE_H__
#define __PICTURE_H__

#include <string>
#include <cv.h>
#include <highgui.h>

using namespace std;

#define NOTHING 77

/* Picture class
 * This is a minimal class that provides the mere access to a wrapped matrix
 * that represent a picture.
 * A more featured Picture can obtained using HumanPicture;
 */
class Picture {
    public:
        /* empty object */
        Picture();
        /* Construct using file on disk */
        Picture(const std::string& path, unsigned short scale_ratio = 1);
        /* Construct using predefined matrix */
        Picture(const cv::Mat& _image, unsigned short scale_ratio = 1);

        bool isInitialized() const; 
    
        /* Provide read only interface to my innet matrix; */
        const cv::Mat& getMatrix() const;
        cv::Size size();
        /* Get the image dimensions
         * @returns -1 on failure */
        int getHeight();
        int getWidth();
    protected:
        /* protected object of the wrapped matrix, providing access to any kind of picture*/
        cv::Mat image;
    
    private:
        bool initialized;
        /* keep the picture's scaling */
        unsigned short scale;
        /* no default copy c'tors */
        Picture(const Picture& p); // no default copy c'tor
        Picture& operator=(const Picture& p); // no default copy c'tor
        
        /* init the object, so the object will be valid even if init is unsccefull 
         * @returns false incase the initialization was unsuccesful */
        bool init(const std::string& path);
        
};


#endif // __PICTURE_H__
